<!DOCTYPE html>
<html>
<head>
	<title>发动机表</title>
	<link rel="stylesheet" type="text/css" href="${request.contextPath}/statics/plugins/MtrSearchZTree/css/demo.css" />
	<link rel="stylesheet" type="text/css" href="${request.contextPath}/statics/plugins/MtrSearchZTree/css/zTreeStyle/zTreeStyle.css" />
	<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
	<div :style="style">
		<div class="">
			<ul id="tree" class="ztree"></ul>
		</div>
	</div>
	<div v-show="showList && !showImport"  style="width: 80%;float: right">
		<div class="grid-btn">
			<#if shiro.hasPermission("engine:manage:save")>
			<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("engine:manage:update")>
			<a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("engine:manage:delete")>
			<a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
			<#if shiro.hasPermission("engine:param:export")>
			<a class="btn btn-primary" @click="exportExcel"><i class="fa fa-download"></i>&nbsp;导出</a>
			</#if>
			<#if shiro.hasPermission("engine:param:openImport")>
			<a class="btn btn-primary" @click="openImport"><i class="fa fa-upload"></i>&nbsp;导入</a>
			</#if>
		</div>
		<table id="jqGrid"></table>
		<div id="jqGridPager"></div>
	</div>

	<div v-show="!showList && !showImport" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">

			<div v-for="item in paramList" class="form-group">
				<div class="col-sm-2 control-label">{{item.paramName}}</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="item.ret" :placeholder="item.paramName" />
				</div>
			</div>

			<div class="form-group">
				<div class="col-sm-2 control-label"></div>
				<input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..."
					   @click="saveOrUpdate" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
	<!--上传文件弹出层开始 -->
	<div v-show="!showList && showImport" class="panel panel-default">
		<form action="" method="post" class="layui-form layui-form-pane" id="exportFrm" lay-filter="exportFrm">
			<div class="layui-upload" style="margin:20px ">
				<a class="btn btn-primary" @click="download"><i class="fa fa-download"></i>&nbsp;下载模板</a><br><br>
				<a class="btn btn-primary" style="float:left;margin-right:20px"  id="test8"><i class="fa fa-file-excel-o"></i>&nbsp;选择文件</a>
				<input style="float:left;width:200px;margin-right:20px" disabled="true" type="text" id="fileName" class="form-control"  placeholder="请选择文件名称" />
				<a class="btn btn-primary" id="test9" ><i class="fa fa-upload"></i>&nbsp;开始上传</a>
			</div>
			<div class="form-group">
				<div class=" control-label"></div>
				&nbsp;&nbsp;<input style="margin: 13px;" type="button" class="btn btn-warning" @click="importReload" value="返回"/>
			</div>
		</form>
	</div>
	<!--上传文件弹出层结束 -->
</div>

<script src="${request.contextPath}/statics/js/modules/param/engineParam.js?_${.now?long}"></script>
<script src="${request.contextPath}/statics/plugins/MtrSearchZTree/js/jquery-migrate-1.2.1.js"></script>
<script src="${request.contextPath}/statics/plugins/MtrSearchZTree/js/jquery.ztree.exhide-3.5.min.js"></script>
<script src="${request.contextPath}/statics/plugins/MtrSearchZTree/MtrSearchZTree.js"></script>
<script src="${request.contextPath}/statics/libs/ajaxupload.js"></script>
</body>
</html>